﻿/* 
 * Copyright 2010 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License")
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ngilead.Common
{
    /// <summary>
    /// ILightEntity contract
    /// </summary>
    public interface ILightEntity
    {
        #region Interface content

        /// <summary>
        /// Add proxy information for the argument property.
        /// </summary>
        /// <param name="property">the property name</param>
        /// <param name="proxyInfo">map of proxy informations (string serialized form)</param>
        void AddProxyInformation(string property, object proxyInfo);

        /// <summary>
        /// Remove a property proxy information
        /// </summary>
        /// <param name="property">the property name</param>
        void RemoveProxyInformation(string property);

        /// <summary>
        /// Get proxy information for the argument property
        /// </summary>
        /// <param name="property">the property name</param>
        /// <returns>the proxy informations for the property _ string serialized form(can be null)</returns>
        object GetProxyInformation(string property);

        /// <summary>
        /// Set the initialization state of a property.
        /// </summary>
        /// <param name="property"></param>
        /// <param name="initialised"></param>
        void SetInitialized(string property, bool initialised);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="property"></param>
        /// <returns>if the property was initialised, false otherwise</returns>
        bool IsInitialized(string property);

        /// <summary>
        /// Debug method : write the declared proxy information
        /// </summary>
        /// <returns>a human readable description of proxy information</returns>
        string GetDebugString();

        /// <summary>
        /// Indicates if the entity has proxy informations or not
        /// </summary>
        /// <returns>returns true if proxyInformation (or initializationMap) is not empty</returns>
        bool HasProxyInformations();

        #endregion
    }
}
